import request from '@/config/axios'

export interface ProductionShippingTaskOrderVO {
  id: number
  orderNumber: string
  dictOrderType: number
  customerCode: string
  customerName: string
  productNumber: string
  productName: string
  productStandard: string
  orderQuantity: number
  dictUnit: number
  dictStatus: number
}

// 查询生产管理-产品管理-发货任务单列表
export const getProductionShippingTaskOrderPage = async (params) => {
  return await request.get({ url: `/produce/production-shipping-task-order/page`, params })
}

// 查询生产管理-产品管理-发货任务单详情
export const getProductionShippingTaskOrder = async (id: number) => {
  return await request.get({ url: `/produce/production-shipping-task-order/view?id=` + id })
}

// 新增生产管理-产品管理-发货任务单
export const createProductionShippingTaskOrder = async (data: ProductionShippingTaskOrderVO) => {
  return await request.post({ url: `/produce/production-shipping-task-order/create`, data })
}

// 修改生产管理-产品管理-发货任务单
export const updateProductionShippingTaskOrder = async (data: ProductionShippingTaskOrderVO) => {
  return await request.put({ url: `/produce/production-shipping-task-order/update`, data })
}

// 删除生产管理-产品管理-发货任务单
export const deleteProductionShippingTaskOrder = async (id: number) => {
  return await request.delete({ url: `/produce/production-shipping-task-order/delete?id=` + id })
}

// 导出生产管理-产品管理-发货任务单 Excel
export const exportProductionShippingTaskOrder = async (params) => {
  return await request.download({ url: `/produce/production-shipping-task-order/export-excel`, params })
}
